#include "IntPoint.h"


IntPoint::IntPoint() : x(0), y(0)
{

}

IntPoint::IntPoint( int _x, int _y ) : x(_x), y(_y)
{

}

void IntPoint::operator=( const IntPoint& rhs )
{
	x = rhs.x;
	y = rhs.y;
}

IntPoint IntPoint::operator+( const IntPoint& rhs )
{
	return IntPoint(x + rhs.x, y+rhs.y);
}

bool IntPoint::InRect( RECT r )
{
	bool bIsInXRange = r.left < x && x < r.right;
	bool bIsInYRange = r.bottom < y && y < r.top;
	return bIsInXRange && bIsInYRange;
}

bool IntPoint::operator==( const IntPoint& rhs ) const
{
	return (x == rhs.x) && (y == rhs.y);
}
